<template>
  <div id="datament">  

    <el-form ref="form" :model="form" label-width="80px">  
     <el-row> 

        <!-- <el-col :span="12" style="display:flex;">

           <el-form-item label="" label-width="0px" >
                 <el-date-picker type="date" @change="data_change" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"  v-model="form.time" ></el-date-picker>
            </el-form-item>

        </el-col> -->

         <el-col :span="24" style="text-align: right;">  
            <el-button type="primary" class="custom_color_button" style="margin-bottom:10px;" @click="refresh_but">刷新</el-button>            
          </el-col> 
    
    </el-row> 
   
   </el-form>

   <!-- 渲染数据list -->
   <datament-list :mentdata="mentdata" > </datament-list>

      
    

      
  </div>
</template>

<script>
import DatamentList from '@/view/Manor/DatamentList'
export default {
  name: 'datament',
  data () {
    return {
        mentdata:[],
        form:{
          time:'',
        },
    }
  },
 components:{
    DatamentList
  },
  created(){
      // this.form.time = this.getNowDate1()
      this.list_fun()
  },
  mounted (){
    
  },
  methods: {
     list_fun(){
          this.post("/manor/statistics", {
              onetime:this.form.time
	        }).then(res => {
            this.mentdata = res.result
            console.log(res)
         })
      },
      data_change(){
        //console.log(this.form.time)
        this.list_fun()
      },
      refresh_but(){
        this.list_fun()
      },
  }
}
</script>


<style scoped>

</style>
